home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 52 / 64er_Magazin_Sonderheft_52_19xx_Markt__Technik_de_Side_B.d64 / listing 6 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  81 lines

  1. 5 gosub60000: rem tabellen bestimmen
  2. 10 rem ********* steuerung ***********
  3. 30 gosub50000
  4. 40 rem reagieren-aufrufen
  5. 60 rem ******* demonstration *********
  6. 62 print:print"be$ = ";be$:print
  7. 64 print"verbzahl (ve) =";ve
  8. 66 print"1.gegenstandszahl (g1) =";g1
  9. 68 print"2.gegenstandszahl (g2) =";g2
  10. 70 print"objektzahl (ob) =";ob
  11. 72 print"personenzahl (pe) =";pe
  12. 80 goto10
  13. 90 rem *******************************
  14. 50000 rem befehl be$ vom spieler erfragen --------------------------------------
  15. 50010 ifud=1then52000
  16. 50020 input"was nun ";be$
  17. 50030 goto51000
  18. 51000 rem be$ in be$(1)-be$(10) zerlegen----------------------------------------
  19. 51010 fori=1to10:be$(i)="":next
  20. 51020 wz=1
  21. 51030 fori=1tolen(be$)
  22. 51040 :ifmid$(be$,i,1)=" "thengosub51100:goto51060
  23. 51045 :ifwz>10thenprint"eingabe ist zu lang !":i=len(be$)+1:goto51060
  24. 51050 :be$(wz)=be$(wz)+mid$(be$,i,1)
  25. 51060 nexti
  26. 51070 goto52000
  27. 51100 rem au$ woerter aussortieren
  28. 51110 ic=0:fori1=1toaz
  29. 51120 :ifbe$(wz)=au$(i1)thenic=1
  30. 51130 nexti1
  31. 51140 ific=0thenwz=wz+1:return
  32. 51150 be$(wz)="":return
  33. 52000 rem die befehlswoerter untersuchen und daraus einen sinn deuten ----------
  34. 52005 ifud=1thenud=0:goto52020
  35. 52010 wz=1:ve=0:ob=0:pe=0
  36. 52020 ic=0:g1=0:g2=0
  37. 52025 rem *** verb ve suchen
  38. 52030 fori=1tovz
  39. 52040 :ifbe$(wz)=ve$(i)thenve=i:ic=1
  40. 52050 nexti:ific=1then52150
  41. 52060 rem *** gegenstand g1/g2 suchen
  42. 52070 fori=1togz
  43. 52080 :ifbe$(wz)<>ge$(i)then52090
  44. 52082 : ic=1
  45. 52084 : ifg1=0theng1=i
  46. 52086 : g2=i:ifg2=g1theng2=0
  47. 52090 nexti:ific=1then52150
  48. 52100 rem *** objekt ob suchen
  49. 52110 fori=1tooz
  50. 52120 :ifbe$(wz)=ob$(i)thenob=i:ic=1
  51. 52130 nexti:ific=1then52150
  52. 52132 rem *** person pe suchen
  53. 52133 fori=1topz
  54. 52134 :ifbe$(wz)=pe$(i)thenpe=i:ic=1
  55. 52135 nexti:ific=1then52150
  56. 52137 ifbe$(wz)="und"thenud=1:ic=1
  57. 52140 ific=0thenprint"ich kenne ";be$(wz);" nicht !":return
  58. 52150 wz=wz+1
  59. 52160 ifwz>10orbe$(wz)=""orud=1thenreturn
  60. 52170 ic=0:goto52025
  61. 60000 rem *****************************
  62. 60001 rem * w o r t - t a b e l l e n *
  63. 60002 rem *****************************
  64. 60010 rem *** au$-wort-tabelle
  65. 60020 data der,die,das,den, ,ueber,unter,auf,in,von,vom,im,nach,durch,mit,dem
  66. 60022 data am
  67. 60030 az=17:dimau$(az):fori=1toaz:readau$(i):next
  68. 60050 rem *** verb-tabelle ve$
  69. 60060 data nimm,verliere,oeffne,gib,sage,inventur,befestige
  70. 60070 vz=7:dimve$(vz):fori=1tovz:readve$(i):next
  71. 60090 rem *** gegenstands-tabelle ge$
  72. 60100 data schwert,schluessel,seil,fackel,armbrust,helm,schild
  73. 60110 gz=7:dimge$(7):fori=1togz:readge$(i):next
  74. 60130 rem *** objekt-tabelle ob$
  75. 60140 data fenster,tuer,truhe,kiste,falltuer
  76. 60150 oz=5:dimob$(oz):fori=1tooz:readob$(i):next
  77. 60160 rem *** personen-tabelle pe$
  78. 60170 data geist,monster,thorin,gommel,ork
  79. 60180 pz=5:dimpe$(pz):fori=1topz:readpe$(i):next
  80. 60200 return
  81.